package com.tuanzi.loan.web.lazy.system;

import org.springframework.data.domain.Page;

import com.tuanzi.loan.business.service.system.SystemUserService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.system.SystemUserSearchRequest;
import com.tuanzi.loan.vo.response.system.SystemUserSearchResponse;

/**
 * @author Ray 2017/09/21
 */
public class SystemUserLazyDataModel extends BaseLazyDataModel<SystemUserSearchRequest, SystemUserSearchResponse> {

	private static final long serialVersionUID = -4670419347550704982L;

	private SystemUserService systemUserService = SpringContextHolder.getBean(SystemUserService.class);

	public SystemUserLazyDataModel(SystemUserSearchRequest userSearchRequest) {
		super(userSearchRequest);
	}

	@Override
	protected Page<SystemUserSearchResponse> doLoad(PageSearcher<SystemUserSearchRequest> pageSearcher) {
		return systemUserService.list(pageSearcher);
	}

}
